package com.jsmy.marketing.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.jsmy.marketing.fg.DataItemFragment;

import java.util.List;

/**
 * Created by PC_WLT on 2018/9/12.
 */

public class DataFragmentAdapter extends FragmentPagerAdapter {
    List<Fragment> mList;

    public DataFragmentAdapter(FragmentManager fm, List<Fragment> list) {
        super(fm);
        this.mList = list;
    }

    @Override
    public DataItemFragment getItem(int position) {
        return (DataItemFragment) mList.get(position);
    }

    @Override
    public int getCount() {
        return mList.size();
    }

}
